using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Windows;
using System.Windows.Data;
using LayoutPlanning.Model;
using Point = LayoutPlanning.Model.Point;

namespace LayoutPlanning.Converters
{
    public class PointToPos : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (!(value is Point))
                return null;
            System.Windows.Point v = (Point) value;
            return v;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (!(value is System.Windows.Point))
                return null;
            return (Point) value;
        }
    }
}